A technique for searching for a particular shape (template) provided in a target image has been widely used as template matching (see Non-Patent Document 1).
In measurement of a pattern on a semiconductor wafer using a scanning electron microscope, the template matching is also performed in order to determine a measurement position. Alignment with the measurement position is roughly carried out by moving a stage with the wafer loaded thereon. However, the positioning accuracy for the stage may lead to a significant misalignment on an image taken by an electron microscope at a high magnification. The template matching is performed in order to correct the misalignment to allow measurement to be carried out at an accurate position. Specifically, a unique pattern located close to the measurement pattern is registered as a template, and the coordinates of the measurement position relative to the template are stored. To determine the measurement position based on the taken image, the template matching is performed on the taken image to determine a matching position. Then, the matching position is moved by a distance corresponding to the stored relative coordinates to determine the measurement position.
FIG. 1 is a diagram illustrating the template matching in the scanning electron microscope. First, an image of the measurement position of an object (FIG. 1A) is taken. A unique pattern contained in the image is registered as a template. The taken image (FIG. 1B) is hereinafter referred to as a template selection image. The unique pattern (FIG. 1C) selected from the template selection screen is referred to as a template. Then, when an image of another object (FIG. 1D) (FIG. 1D may show another location with the same pattern on the same wafer as those in FIG. 1A, for example, the same portion of dies repeatedly formed on the same wafer, or a location with the same pattern on a different wafer) is taken, the taken image is searched for a pattern matching the template. The taken image (FIG. 1E) is hereinafter referred to as a search image. Misalignment corresponding to a positioning error in the stage may occur between the template selection image B and the search image (FIG. 1E). The misalignment is corrected by the template matching. As a result of the template matching, locations with high similarity (correlation) to the corresponding location on the template are determined to be candidates for a matching position. One of the candidates which is most likely to be a matching position is determined to be the final matching position.
In measurement of a pattern on a semiconductor wafer using a scanning electron microscope, if pattern shapes fail to be uniformly formed, the template matching needs to be performed on distorted patterns. This is because the improved micromachining of semiconductors has made formation of the same shape with high reproducibility difficult. In such a case, possible slight distortion between the template pattern and the target pattern in the search image needs to be tolerated during the template matching (the patterns can be recognized to match each other in spite of the distortion).
An image of a pattern on a semiconductor wafer taken by a scanning electron microscope is formed of edges. That is, it is important to determine how boundaries between areas with almost the same luminance or white edges called white bands are arranged.
In this connection, for example, Non-Patent Document 2 discloses that stable matching is implemented by thickening (expanding) edge images in the template matching thereof to tolerate distortion such as scaling. FIG. 2 shows the template matching in which the template and the search image are images of ring-shaped white bands with different radii and the template matching in which the white bands are thickened. In FIG. 2A, the template is the entire template selection image of the ring-shaped white band with the large radius. In FIG. 2B, the search image is the ring-shaped white band with a radius smaller than that in FIG. 2A. When the template matching is performed on FIG. 2B using FIG. 2A as a template, the resultant normalized correlation map is shaped like a ring as shown in FIG. 2C. Thus, the center of the ring (the center of the distortion) cannot be determined to be a matching position (the position with the maximum normalized correlation value, that is, with the maximum luminance in the normalized correlation map). In contrast, when the template matching is performed on image diagrams 2D and 2E in which the white bands in FIGS. 2A and 2B are thickened, the resultant normalized correlation map shows a circle the center of which is brightest as shown in FIG. 2F. Thus, the center of the ring can be determined to be the matching position.    Non-Patent Document 1: Digital Picture Processing authored by Azriel Rosenfeld and Avinash C. Kak, see Section 8.3    Non-Patent Document 2: “High-speed Template Matching Algorithm Using Contour Point Information”, IEICE Transactions, Vol. J74-D2, No. 10, pp. 1419-1427, Section 2.2